<extend name="Base/common"/>
<block name="Content">
	<div class="am-cf am-padding-top">
        <div class="am-fl am-cf">
            <i class="am-icon-pencil-square-o"></i>
            <strong class="am-text-primary am-text-lg">
               <notempty name="roleModel">
                    编辑<else/>新增
                </notempty>角色
            </strong>
        </div><hr data-am-widget="divider" class="am-divider am-divider-default" />
    </div>
    <div class="am-tabs" data-am-tabs>
        <ul class="am-tabs-nav am-nav am-nav-tabs">
            <li>
                <a href="#tab2">角色信息</a>
            </li>
        </ul>
        <div class="am-tabs-bd">
            <div class="am-tab-panel am-fade" id="tab2">
                <form class="am-form" method="post" action="{:U('Role/saveAction')}">
                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            权限级别
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                            <input type="number" class="am-input-sm" max="100" min="1" step="1"
                            	name="role_level" value="{$roleModel['role_level']}">
                        </div>
                        <div class="am-hide-sm-only am-u-md-6">
                            *值越小，级别越高
                        </div>
                    </div>
                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            角色名称
                        </div>
                        <div class="am-u-sm-8 am-u-md-4">
                            <input type="text" class="am-input-sm" name="role_name" value="{$roleModel['role_name']}" required/>
                        </div>
                        <div class="am-hide-sm-only am-u-md-6">
                            *必填，不可重复
                        </div>
                    </div>
                    <div class="am-margin">
                        <button type="submit" class="am-btn am-btn-success am-btn-xs ajax-post" target-form="am-form">
                            提交保存
                        </button>
                        <button type="button" class="am-btn am-btn-secondary am-btn-xs" onclick="javascript:history.back(-1);return false;">
                            返回列表
                        </button>
                        <input type="hidden" name="role_id" value="{$roleModel['role_id']}"/>
                    </div>
                </form>
            </div>
        </div>
    </div>
    </div>
</block>
